﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using gnu.trove.map.hash;

namespace Game.templates.jump
{
    public class JumpTrack
    {
	    /**
	     * Field _id.
	     */
	    private int _id;
	    /**
	     * Field _trackWays.
	     */
	    private TIntObjectHashMap _trackWays;
	    /**
	     * Field _startLoc.
	     */
	    private Location _startLoc;
	
	    /**
	     * Constructor for JumpTrack.
	     * @param id int
	     * @param startLoc Location
	     */
	    public JumpTrack(int id, Location startLoc)
	    {
		    _id = id;
		    _trackWays = new TIntObjectHashMap();
		    _startLoc = startLoc;
	    }
	
	    /**
	     * Method getId.
	     * @return int
	     */
	    public int getId()
	    {
		    return _id;
	    }
	
	    /**
	     * Method getWay.
	     * @param id int
	     * @return JumpWay
	     */
	    public JumpWay getWay(int id)
	    {
		    return _trackWays.get(id) as JumpWay;
	    }
	
	    /**
	     * Method addWay.
	     * @param way JumpWay
	     */
	    public void addWay(JumpWay way)
	    {
		    _trackWays.put(way.getId(), way);
	    }
	
	    /**
	     * Method getStartLocation.
	     * @return Location
	     */
	    public Location getStartLocation()
	    {
		    return _startLoc;
	    }
    }
}
